unit FormShtrihOptions;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
  cxDataStorage, cxEdit, DB, cxDBData, ADODB, cxGridLevel, cxClasses,
  cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView,
  cxGridDBTableView, cxGrid, StdCtrls, ExtCtrls, ActnList;

type
  TfrmShtrihOptions = class(TForm)
    Panel1: TPanel;
    Panel2: TPanel;
    bClose: TButton;
    Button2: TButton;
    cxGrid1DBTableView1: TcxGridDBTableView;
    cxGrid1Level1: TcxGridLevel;
    cxGrid1: TcxGrid;
    adsShtrihOpt: TADODataSet;
    dsShtrihOpt: TDataSource;
    cxGrid1DBTableView1DBtitle: TcxGridDBColumn;
    cxGrid1DBTableView1DBvalue: TcxGridDBColumn;
    ActionList1: TActionList;
    actApply: TAction;
    procedure bCloseClick(Sender: TObject);
    procedure actApplyExecute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    constructor Create(AOwner : TComponent); reintroduce;
  end;

var
  frmShtrihOptions: TfrmShtrihOptions;

implementation

uses DataModule;

const SQLSelectShtrih =' SELECT * FROM ShtrihOption';

{$R *.dfm}

{ TfrmShtrihOptions }

constructor TfrmShtrihOptions.Create(AOwner: TComponent);
begin
    inherited;
    adsShtrihOpt.CommandText := SQLSelectShtrih;
    adsShtrihOpt.Open;
end;

procedure TfrmShtrihOptions.bCloseClick(Sender: TObject);
begin
    Close;
end;

procedure TfrmShtrihOptions.actApplyExecute(Sender: TObject);
begin
    adsShtrihOpt.UpdateBatch();
    Close;
end;

end.
